package struts.service.impl;

import struts.service.UserService;
import struts.service.vo.UserVo;

public class UserServiceImpl implements UserService {

	public UserVo getVO(String user) {
		boolean b = this.isuser(user);
		UserVo vo = new UserVo();
		if(b==true)
		{
			//获得转发器对象
			vo.setUsername("admin");
			vo.setPassword("123456");
//			转发器对象只要一个字符串对象进行转发,如果你给的地址错误,就转发到错误的地址上
		}
		return vo;
	}

	/**
	 * 判断用户名是否存在
	 * @param 吴心宽
	 * @date 2015-7-26 9:19
	 * @return
	 */
	private boolean isuser(String user){
		boolean b = false;
		if(user.equals("admin")){
			b = true;
		}
		return b;
	}
}
